<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title></title>
    <style type="text/css">
        #div1{
            display: flex;
            width: 100px;
            height: 100px;
        }
    </style>
</head>
<body>
<div id="div1">
    <form action="photo.php" method="post" enctype="multipart/form-data">
        <input type="file" src="" name="file[]" id="file" value=""  multiple="multiple"/><br />
        <img src="" id="img" alt="请选择头像"><br />
        <button type="button" onclick="photo();">显示头像</button>
        <button type="submit">提交</button>
    </form>
</div>
<form action="message.php" method="post">
姓名：<input type="text" name="username" id="" value="" />
<br />
特长：<input type="text" name="specislty" id="" value="" />
<br />
性别：<input type="radio" checked="checked" name="sex" id="" value="1" />男
<input type="radio"name="sex" id="" value="2" />女
<br />
公司：<input type="text" name="company" id="" value="" />
<br />
职务：<input type="text" name="job" id="" value="" />
<br />
微信：<input type="text" name="wechart" id="" value="" />
<br />
QQ：<input type="text" name="qq" id="" value="" />
<br />
领英：<input type="text" name="linkedin" id="" value="" />
<br />
微博：<input type="text" name="twitter" id="" value="" />
<br />
博客：<input type="text" name="blog" id="" value="" />
<br />
所在地：<select name="provience">
    <option value="">江西省</option>
    <option value="">福建省</option>
    <option value="">广西省</option>
</select>
<select name="city">
    <option value="">鹰潭市</option>
    <option value="">鹰潭市</option>
    <option value="">鹰潭市</option>
</select>
<br />
自我介绍：<textarea rows="10" cols="20" name="present">	</textarea>
<br />
<button type="submit">更新</button>
</form>
</body>
<script type="text/javascript">
    function photo(){
        var file_id = document.getElementById('file');
        var files = file_id['files'];
        var URL = window.URL||window.webkitURL;
        var imgURL = URL.createObjectURL(files[0]);
        document.getElementById('img').src = imgURL;
    }
</script>
</html>
